<%@ page language="java"  pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta name="format-detection" content="telephone=no,email=no,adress=no">
<link href="<%=request.getContextPath()%>/css/global.css" type="text/css" rel="stylesheet" />
<link href="<%=request.getContextPath() %>/js/easyui/themes/metro/easyui.css" type="text/css" rel="stylesheet"/>
<link href="<%=request.getContextPath() %>/js/date/skin/WdatePicker.css" type="text/css" rel="stylesheet"/>
<link href="<%=request.getContextPath()%>/js/autocomplate/jquery.autocomplete.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="<%=request.getContextPath() %>/js/jquery.js"></script>
<script type="text/javascript" src="<%=request.getContextPath() %>/js/global.js"></script>
<script type="text/javascript" src="<%=request.getContextPath() %>/js/easyui/easyui.js"></script>
<script type="text/javascript" src="<%=request.getContextPath() %>/js/date/WdatePicker.js"></script>
<script type="text/javascript" src="<%=request.getContextPath()%>/js/autocomplate/jquery.autocomplete.js"></script>
<script type="text/javascript">

$(function(){
	
	$("#dataTable").datagrid({
		toolbar: '#dataSearch',
		fitColumns:true,
		striped: true, 
		singleSelect:false,
		pagination:true,
		rownumbers:true,
		SelectOnCheck:true,
		CheckOnSelect:true,
        onSelect: function(index,row){
        	var nos="";
        	var rows = $('#dataTable').datagrid('getSelections');
        	for(var i=0; i<rows.length; i++){
        		nos=nos+rows[i].ck+",";
        	}
			$("#keys").val(nos);
    	},
    	onUnselect: function(index,row){
        	var nos="";
        	var rows = $('#dataTable').datagrid('getSelections');
        	for(var i=0; i<rows.length; i++){
        		nos=nos+rows[i].ck+",";
        	}
			$("#keys").val(nos);
    	},
    	onSelectAll: function(rows){
        	var nos="";
        	for(var i=0; i<rows.length; i++){
        		nos=nos+rows[i].ck+",";
        	}
			$("#keys").val(nos);
    	},
    	onUnselectAll: function(rows){
			$("#keys").val("");
    	}
	});
	
	$('#dataTable').datagrid('getPager').pagination({
		total:<s:property value="pageInfo.pageRecord"/>,
		pageNumber:<s:property value="pageInfo.pageIndex"/>,
		pageSize:<s:property value="pageInfo.pageSize"/>,
		pageList: [20,50,100] ,
		onSelectPage:function(pageNumber,pageSize){  
			toPage(pageNumber,pageSize);
		},
		onRefresh:function(pageNumber,pageSize){  
			location.reload();
		}
	});

});

</script>
</head>
<body >
<div id="dataSearch" >    
<form id="sform" action="rof_viewrxf.html" method="get" enctype="multipart/form-data">
<table style="width: 100%;">
<tr>
<td height="25" >
	<b>操作说明:功能名称模糊查询</b> 
</td>
</tr>
<tr><td height="30" >
<s:textfield name="rolName" id="rolName" placeholder="角色模版名称"></s:textfield>
<s:select id="rolState" name="rolState" list="#{'1':'启用','0':'停用'}" headerKey="" headerValue="状态"  />
<s:textfield  id="rolDateTop"  name="rolDateTop"  placeholder="日期起" onclick="WdatePicker();"  cssStyle="width:100px;" ><s:param name="value"><s:date name="rolDateTop" format="yyyy-MM-dd"/></s:param></s:textfield>
 - 
<s:textfield  id="rolDateEnd"  name="rolDateEnd" placeholder="日期止"  onclick="WdatePicker();"  cssStyle="width:100px;" ><s:param name="value"><s:date name="rolDateEnd" format="yyyy-MM-dd"/></s:param></s:textfield>
<s:textfield name="funName" id="funName" placeholder="功能名称"></s:textfield>
<s:textfield name="funDad" id="funDad" placeholder="父级编号"></s:textfield>
<s:select id="rolState" name="rolState" list="#{'1':'启用','0':'停用'}" headerKey="" headerValue="状态"  />

<s:textfield  id="funDateTop"  name="funDateTop"  placeholder="日期起" onclick="WdatePicker();"  cssStyle="width:100px;" ><s:param name="value"><s:date name="funDateTop" format="yyyy-MM-dd"/></s:param></s:textfield>
 - 
<s:textfield  id="funDateEnd"  name="funDateEnd"  placeholder="日期止" onclick="WdatePicker();"  cssStyle="width:100px;" ><s:param name="value"><s:date name="funDateEnd" format="yyyy-MM-dd"/></s:param></s:textfield>

<input type="button" class="submit" value="查询搜索" onclick="sform.submit();"/></td>
</tr>
<tr><td><hr/></td></tr>
<tr>
<td height="30" >
		<input type="hidden"  id="keys" name="keys"  value=""/>
		<input type="button" class="submit" value="角色名称" onclick="toSort('sortField','rolName')"/>
		<input type="button" class="submit" value="角色日期" onclick="toSort('sortField','rolDate')"/>
		<input type="button" class="submit" value="序号排序" onclick="toSort('sortField','funSeq')"/>
		<input type="button" class="submit" value="父级排序" onclick="toSort('sortField','funDad')"/>
		<input type="button" class="submit" value="功能日期" onclick="toSort('sortField','funDate')"/>
		
		&nbsp;&nbsp;&nbsp;&nbsp;
		<input type="button" class="submit" value="升序排列" onclick="toSort('sortOrder','true')"/>
		<input type="button" class="submit" value="降序排列" onclick="toSort('sortOrder','false')"/>
</td>
</tr>
</table>
</form>
</div>

<table id="dataTable" style="width: 100%;" class="easyui-datagrid" >
<thead>
<tr>
<th data-options="field:'ck'" checkbox="true"></th>
<th data-options="field:'rolName', width:'30%',align:'left' , halign: 'left'">角色模版名称</th>
<th data-options="field:'rolDate', width:'10%',align:'left' , halign: 'left'">登记日期</th>
<th data-options="field:'funName', width:'12%',align:'left' , halign: 'left'">功能名称</th>
<th data-options="field:'funDad', width:'10%',align:'left' , halign: 'left'">父级菜单编号</th>
<th data-options="field:'funRedirect', width:'20%',align:'left' , halign: 'left'">链接</th>
<th data-options="field:'funSeq', width:'5%',align:'left' , halign: 'left'">功能组序号</th>
<th data-options="field:'funDate', width:'10%',align:'left' , halign: 'left'">日期</th>
</tr>
</thead>
<tbody>
<s:iterator value="roleFunctionList" id="show" status="seq">
<tr>
<td><s:property value="#show.rolNo"/>_<s:property value="#show.funNo"/></td>
<td><s:property value="#show.rolName"/></td>
<td><s:text name="global.format.datetime"><s:param value="#show.rolDate"/></s:text>
<td><s:property value="#show.funName"/></td>
<td><s:property value="#show.funDad"/></td>
<td><s:property value="#show.funRedirect"/></td>
<td><s:property value="#show.funSeq"/></td>
<td><s:text name="global.format.dateminute"><s:param value="#show.funDate"/></s:text></td>
</tr>
</s:iterator>
</tbody>
</table>
<br/>
<br/>
<br/>
</body>
</html>
